import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home/index'
  },
  {
    name: "Home",
    path: '/home',
    component: () => import('@/views/HomeView.vue'),
    children: [
      {
        name: "index",
        path: "index",
        component: () => import('@/pages/IndexView.vue')
      },
      {
        path: "found",
        component: () => import('@/pages/FoundView.vue'),
      },
      {
        path: "news",
        component: () => import('@/pages/NewsView.vue')
      },
      {
        path: "mine",
        component: () => import('@/pages/MineView.vue'),
        children: [
          {
            name: "note",
            path: "note",
            component: () => import('@/pages/mine/NoteView.vue')
          },
          {
            name: "fabulous",
            path: "fabulous",
            component: () => import('@/pages/mine/FabulousView.vue'),
          },
          {
            name: "collection",
            path: "collection",
            component: () => import('@/pages/mine/CollectionView.vue'),
          },
        ]
      },
      
    ]
  },
  {
    name: "Details",
    path: "/details",
    component: () => import('@/views/DetailsView.vue')
  },
  {
    path: "/login",
    component: () => import('@/views/LoginView.vue')
  },
  {
    name: "proDetails",
    path: "/proDetails",
    component: () => import('@/views/ProDetailsView.vue')
  },
  {
    name: "setUp",
    path: "/setUp",
    component: () => import('@/views/SetUpView.vue')
  },
  {
    name: "search",
    path: "/search",
    component: () => import('@/views/SearchView.vue')
  },
  {
    name: "release",
    path: "/release",
    component: () => import('@/views/ReleaseView.vue')
  },
  {
    name: "chat",
    path: "/chat",
    component: () => import('@/views/ChatView.vue')
  },
  {
    name: "chata",
    path: "/chata",
    component: () => import('@/views/ChatA.vue')
  },
  {
    name: "chatb",
    path: "/chatb",
    component: () => import('@/views/ChatB.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
